package com.bwhx.eruler.dao.casdilly.impl;

import java.util.List;
import org.springframework.stereotype.Repository;
import org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor;

import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.bean.casdilly.ClothesTypeExport;
import com.bwhx.eruler.dao.casdilly.IClothesTypeExportDAO;
import com.bwhx.eruler.dao.impl.BaseDaoImpl;

@Repository
public class ClothesTypeExportDAOImpl extends BaseDaoImpl<ClothesTypeExport> implements IClothesTypeExportDAO {

	public ClothesTypeExportDAOImpl() {
		this.setNs("com.bwhx.eruler.mapper.casdilly.ClothesTypeExportMapper.");
	}

	@Override
	public List<ClothesTypeExport> queryClothesTypeExport(Page entity) {
		return this.getSqlSession().selectList(this.getNs() + "queryClothesTypeExport", entity);
	}

	@Override
	public Integer queryClothesTypeExportCount(ClothesTypeExport entity) {
		return getSqlSession().selectOne(this.getNs() + "count", entity);
	}

	@Override
	public void addClothesTypeExport(ClothesTypeExport entity) {
		this.getSqlSession().insert(getNs() + "saveClothesTypeExport", entity);
	}

	@Override
	public void updateClothesTypeExport(ClothesTypeExport entity) {
		this.getSqlSession().update(getNs() + "updateClothesTypeExport", entity);
	}

	@Override
	public void deleteClothesTypeExport(ClothesTypeExport entity) {
		this.getSqlSession().delete(getNs() + "deleteClothesTypeExport", entity);

	}

	@Override
	public List<ClothesTypeExport> getClothesTypeExportByCategoryName(String categoryName) {
		return this.getSqlSession().selectList(this.getNs() + "getClothesTypeExportByCategoryName", categoryName);
	}

	@Override
	public String saveClothesTypeExports(List<ClothesTypeExport> entities) {
		int result = this.getSqlSession().insert(getNs() + "saveClothesTypeExports", entities);
		return String.valueOf(result);
	}

}
